#pragma once
#include "RpcConnectPool.hpp"
#include "Singleton.hpp"
#include "message.grpc.pb.h"
#include "message.pb.h"
#include <grpcpp/grpcpp.h>
#include <memory>

class VerifyGrpcClient : public Singleton<VerifyGrpcClient> {
  friend class Singleton<VerifyGrpcClient>;

private:
  VerifyGrpcClient();
  std::unique_ptr<message::VerifyService::Stub> _stub;
  std::unique_ptr<RpcConnectPool<message::VerifyService>> _pool;

public:
  message::GetVerifyRsp GetVerifyCode(std::string &email);
};